package xyz.xiezc.spider;

import lombok.Data;
import xyz.xiezc.spider.common.Request;
import xyz.xiezc.spider.common.annotation.MatchBean;
import xyz.xiezc.spider.common.annotation.MatchField;
import xyz.xiezc.spider.common.annotation.NextRequest;
import xyz.xiezc.spider.common.annotation.QueryParam;

import java.util.List;

/**
 * @author wb-xzc291800
 * @date 2019/04/08 9:19
 */
//https://blog.csdn.net/qq_33196814/article/details/80866122
@MatchBean("https://blog.csdn.net/(.*?)/article/details/(\\d+)")
@Data
public class TestBean {

    @QueryParam(index = 1)
    String type;

    @MatchField("#mainBox > main > div.blog-content-box > div > div > div.article-title-box > h1")
    String title;

    @NextRequest("#mainBox > main > div.recommend-box > div > div > a")
    List<Request> nextRequests;

}
